// routes/payment.routes.js
const express = require('express');
const router = express.Router();

// 导入控制器
const {
  createPaymentOrder,
  paymentCallback,
  getPaymentStatus
} = require('../controllers/payment.controller');

// 导入中间件
const {
  authenticateToken
} = require('../middleware/auth.middleware');

// 创建支付订单端点
router.post('/orders', authenticateToken, createPaymentOrder);

// 支付回调端点
router.post('/callback', paymentCallback);

// 查询支付状态端点
router.get('/orders/:orderId/status', authenticateToken, getPaymentStatus);

module.exports = router;